begin align

base case:  D(i,i)=0base case:  D(i,i+1)=k[i]+k[i+1]general case:  D(i,j)=m=ijk[m]+argmini  l < jD(i, l)+D(l+1, j)